{% extends "base.html" %}
{% block title %}Student takes exam{% endblock %}
{% block content %}
    <div id="page-wrap">
    <div>
        <h2>Exam: {{ exam.title }}</h2>
        <p>
        Title: {{ exam.title }}<br />
        Exam Author: {{ exam.author }}<br />
        Description: {{ exam.description }}<br />
        Deadline: {{ exam.deadline|date:'Y-m-d H:i' }}<br />
        </p>
        <p>
            <a href="javascript:saveStudentExamFormWS();" id="btnSave">Finish</a>
        </p>
        <p id="message"></p>
    </div>



    <h2>Questions</h2>
    {% for q in questions %}
       <fieldset>
       <b>{{ q.question }}</b><br />
        {% for o in q.options %}
            <input type="radio" name="q{{ q.qid }}" id="q{{ q.qid }}_o{{ o.id }}" value="{{ o.id }}" /> {{ o.answer_option }}<br />
        {% endfor %}
       <input type="hidden" class="question" id="q{{ q.qui }}" value="{{ q.qid }}" />
        </fieldset>
        
    {% endfor %}

    <input type="hidden" id="questioncount" value="{{ questioncount }}" />
    <input type="hidden" id="eid" value="{{ exam.id }}" />
</div>
    <script id="create_result_tmpl" type="text/x-jquery-tmpl">
        <div>
            <h2>Your new Exam is now ready</h2>
            <p>Result from server:${success}</p>
        </div>
    </script>
{% endblock %}